export interface RouteMetaType {
  title?: string
  requiresAuth?: boolean
  permissions?: string[]
  icon?: string
  hidden?: boolean
  keepAlive?: boolean
}

export interface MenuItemType {
  id: string
  title: string
  path?: string
  icon?: string
  children?: MenuItemType[]
  permissions?: string[]
  hidden?: boolean
}

export const menuConfig: MenuItemType[] = [
  {
    id: 'dashboard',
    title: '仪表板',
    path: '/dashboard',
    icon: 'dashboard'
  },
  {
    id: 'user-management',
    title: '用户管理',
    icon: 'users',
    children: [
      {
        id: 'users',
        title: '学员管理',
        path: '/users'
      },
      {
        id: 'departments',
        title: '部门管理',
        path: '/departments'
      }
    ]
  },
  {
    id: 'admin-management',
    title: '管理员',
    icon: 'admin',
    children: [
      {
        id: 'admin-users',
        title: '管理员管理',
        path: '/admin-users'
      },
      {
        id: 'admin-roles',
        title: '角色管理',
        path: '/admin-roles'
      }
    ]
  },
  {
    id: 'course-management',
    title: '课程管理',
    icon: 'course',
    children: [
      {
        id: 'courses',
        title: '课程列表',
        path: '/courses'
      }
    ]
  },
  {
    id: 'resource-management',
    title: '资源管理',
    icon: 'resource',
    children: [
      {
        id: 'resources',
        title: '资源列表',
        path: '/resources'
      },
      {
        id: 'resource-categories',
        title: '资源分类',
        path: '/resource-categories'
      }
    ]
  },
  {
    id: 'system-management',
    title: '系统管理',
    icon: 'system',
    children: [
      {
        id: 'system',
        title: '系统设置',
        path: '/system'
      },
      {
        id: 'app-config',
        title: '应用配置',
        path: '/app-config'
      },
      {
        id: 'ldap',
        title: 'LDAP配置',
        path: '/ldap'
      },
      {
        id: 'cache',
        title: '缓存管理',
        path: '/cache'
      }
    ]
  },
  {
    id: 'logs',
    title: '日志管理',
    icon: 'logs',
    children: [
      {
        id: 'admin-logs',
        title: '管理员日志',
        path: '/admin-logs'
      },
      {
        id: 'attachment-download-logs',
        title: '附件下载日志',
        path: '/attachment-download-logs'
      },
      {
        id: 'ldap-sync-logs',
        title: 'LDAP同步日志',
        path: '/ldap-sync-logs'
      }
    ]
  }
]